#/usr/bin/env python
# -*- coding: utf8 -*-
# title       :
# description :
# author      :'ShenMeng'

import maya.cmds as cmds

class Validation(object):
    name = u'RenderAnimLayer | 灯光动画层检查'
    dataDict = {}

    def execute(self):
        self.dataDict = {}
        lightAnimLayerList = cmds.ls(type=['renderLayer', 'animLayer'])
        lightAnimLayerList.remove('defaultRenderLayer')
        if lightAnimLayerList:
            for layer in lightAnimLayerList:
                self.dataDict[layer] = []
        return self.dataDict

    def correct(self):
        for layer, _ in self.dataDict.items():
            cmds.delete(layer)

    def search(self, obj):
        cmds.select(obj)
